package com.tjsinfo.tjsoa.system.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.system.bo.ILianDongBO;
import com.tjsinfo.tjsoa.system.vo.LianDong;

/**
 * 添加联动
 * @author Administrator
 *
 */
public class AddLianDongAction extends Action {
	private ILianDongBO lianDongBO;
	
	
	public ILianDongBO getLianDongBO() {
		return lianDongBO;
	}


	public void setLianDongBO(ILianDongBO lianDongBO) {
		this.lianDongBO = lianDongBO;
	}


	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		LianDong lianDong = new LianDong();
		lianDong.setLianDongId(request.getParameter("zhusongid"));
		lianDong.setLianDongLable(request.getParameter("postName"));
		lianDong.setLianDongName(request.getParameter("zhusongidname"));
		lianDong.setSort(request.getParameter("postsort"));
		lianDongBO.addLianDong(lianDong);
		request.setAttribute("linkurl", "system/liandong/liandonglist.jsp");
		request.setAttribute("message", "system.save.message");
		return mapping.findForward("success");
	}
}